package com.atguigu.gmall.pms.vo;

import com.atguigu.gmall.pms.entity.SpuAttrValueEntity;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.CollectionUtils;

import java.util.Collections;
import java.util.List;

/**
 * wbq
 * 2021/1/20
 */
public class SpuAttrValueVo extends SpuAttrValueEntity {


    private List<String> valueSelected;

    public void setValueSelected(List<String> valueSelected) {

        if (CollectionUtils.isEmpty(valueSelected)){
            return;
        }

        this.setAttrValue(StringUtils.join(valueSelected, ","));
    }
}
